/*  
 *  Copyright 2006 Paul Jack.
 *
 *  This file is part of the Dex compiler suite. 
 *  
 *  Dex is free software; you can redistribute it and/or modify it
 *  under the terms of the GNU General Public License as published by the
 *  Free Software Foundation; either version 2 of the License, or (at your
 *  option) any later version.
 *  
 *  Dex is distributed in the hope that it will be useful, but
 *  WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 *  Public License for more details.
 *  
 *  You should have received a copy of the GNU General Public License along
 *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
 */
package dex.compiler.model.statement;


import dex.compiler.model.expression.ArrayExpression;
import dex.compiler.model.expression.CastExpression;
import dex.compiler.model.expression.DirectCall;
import dex.compiler.model.expression.IdentifierExpression;
import dex.compiler.model.expression.IndirectCall;
import dex.compiler.model.expression.InfixExpression;
import dex.compiler.model.expression.IsExpression;
import dex.compiler.model.expression.LiteralBoolean;
import dex.compiler.model.expression.LiteralFunction;
import dex.compiler.model.expression.LiteralInteger;
import dex.compiler.model.expression.LiteralString;
import dex.compiler.model.expression.MemberExpression;
import dex.compiler.model.expression.NewExpression;
import dex.compiler.model.expression.UnaryExpression;
import dex.compiler.model.expression.VirtualCall;
import dex.compiler.model.type.ArrayTypeNode;
import dex.compiler.model.type.BasicTypeNode;
import dex.compiler.model.type.FunctionTypeNode;


/**
 * Delegates visits during a walk.
 * 
 * <p>This class preserves all the default walking rules, and delegates
 * visits to a visitor specified at construction time.
 */
public class DelegateStatementWalker extends StatementWalker {

	
	/**
	 * The delegate visitor.
	 */
	final private StatementVisitor visitor;
	
	
	/**
	 * Constructor. 
	 * 
	 * @param visitor  the delegate visitor
	 */
	public DelegateStatementWalker(StatementVisitor visitor) {
		if (visitor == null) {
			throw new IllegalArgumentException("visitor may not be null");
		}
		this.visitor = visitor;
	}


	public void enterBlock(Block s) {
		visitor.enterBlock(s);
	}


	public void enterForStatement(ForStatement s) {
		visitor.enterForStatement(s);
	}


	public void exitBlock(Block s) {
		visitor.exitBlock(s);
	}


	public void exitForStatement(ForStatement s) {
		visitor.exitForStatement(s);
	}


	public void visitArrayExpression(ArrayExpression e) {
		visitor.visitArrayExpression(e);
	}


	public void visitArrayTypeNode(ArrayTypeNode t) {
		visitor.visitArrayTypeNode(t);
	}


	public void visitAssignment(Assignment s) {
		visitor.visitAssignment(s);
	}


	public void visitBasicTypeNode(BasicTypeNode t) {
		visitor.visitBasicTypeNode(t);
	}


	public void visitCallExpression(IndirectCall e) {
		visitor.visitCallExpression(e);
	}


	public void visitCallStatement(CallStatement s) {
		visitor.visitCallStatement(s);
	}


	public void visitCastExpression(CastExpression e) {
		visitor.visitCastExpression(e);
	}


	public void visitCatchBlock(CatchBlock s) {
		visitor.visitCatchBlock(s);
	}


	public void visitComment(Comment s) {
		visitor.visitComment(s);
	}


	public void visitDeclaration(Declaration s) {
		visitor.visitDeclaration(s);
	}


	public void visitDecrementStatement(DecrementStatement s) {
		visitor.visitDecrementStatement(s);
	}


	public void visitDirectCall(DirectCall e) {
		visitor.visitDirectCall(e);
	}


	public void visitFunctionTypeNode(FunctionTypeNode t) {
		visitor.visitFunctionTypeNode(t);
	}


	public void visitIdentifierExpression(IdentifierExpression e) {
		visitor.visitIdentifierExpression(e);
	}


	public void visitIfStatement(IfStatement s) {
		visitor.visitIfStatement(s);
	}


	public void visitIncrementStatement(IncrementStatement s) {
		visitor.visitIncrementStatement(s);
	}


	public void visitInfixExpression(InfixExpression e) {
		visitor.visitInfixExpression(e);
	}


	public void visitIsExpression(IsExpression e) {
		visitor.visitIsExpression(e);
	}


	public void visitLiteralBoolean(LiteralBoolean e) {
		visitor.visitLiteralBoolean(e);
	}


	public void visitLiteralFunction(LiteralFunction e) {
		visitor.visitLiteralFunction(e);
	}


	public void visitLiteralInteger(LiteralInteger e) {
		visitor.visitLiteralInteger(e);
	}


	public void visitLiteralString(LiteralString e) {
		visitor.visitLiteralString(e);
	}


	public void visitMemberExpression(MemberExpression e) {
		visitor.visitMemberExpression(e);
	}


	public void visitNewExpression(NewExpression e) {
		visitor.visitNewExpression(e);
	}


	public void visitReturnStatement(ReturnStatement s) {
		visitor.visitReturnStatement(s);
	}


	public void visitSwitchCase(SwitchCase s) {
		visitor.visitSwitchCase(s);
	}


	public void visitSwitchStatement(SwitchStatement s) {
		visitor.visitSwitchStatement(s);
	}


	public void visitThrowStatement(ThrowStatement s) {
		visitor.visitThrowStatement(s);
	}


	public void visitTryStatement(TryStatement s) {
		visitor.visitTryStatement(s);
	}


	public void visitUnaryExpression(UnaryExpression e) {
		visitor.visitUnaryExpression(e);
	}


	public void visitVirtualCall(VirtualCall e) {
		visitor.visitVirtualCall(e);
	}


	public void visitWhileStatement(WhileStatement s) {
		visitor.visitWhileStatement(s);
	}
	
	
	
	
}
